import '../../util/http.dart';
import 'package:flutter/material.dart';

class Delivery{

    BuildContext? context;

    static Delivery of(BuildContext? context){
      Delivery delivery = Delivery();
      delivery.context = context;
      return delivery;
    }

    /// 保存配送单
    Future<dynamic> save(data) async{
      return await ApiService.of(context).put('lgs/delivery/save', data);
    }

    /// 立即配送
    Future<dynamic> immediately(id) async{
      return await ApiService.of(context).put('lgs/delivery/immediately/'+id, null);
    }
}